com.doclinx.ftxml
Class AppParms

java.lang.Object
  |
  +--com.doclinx.ftxml.AppParms

public abstract class AppParms
extends java.lang.Object

Abstract callback class for passing application specific parameters on a file-by-file basis. The application extends the class in order to implement the callback feature allowing addition of parameters to the indexed file. The callback entry points can also control individual file exclusion and also abort the entire process. The functions in this class are called while processing files in the catAddFile() method.

See Also:
sr_f1 parameter definition

Field Summary
 int mode
          Mode of operation control bit settings.
static int PC_ADDCAT
          mode: Put parameters into catalog (6th auxInfo item)
static int PC_INDEX
          mode: Index parameters.
static int PC_PARRAY
          mode: C++ ONLY
static int PC_SARRAY
          mode: C++ ONLY
static int PC_STRING
          mode: String parameters (use sRoot for tag): 'p1="word" p2="wrd wrd"')
static int PC_TAG
          mode: Complete XML-like specification: '<tag p1="word" p2="wrd wrd">')
 java.lang.String sParms
          The parameter string passed back based on current file path
 java.lang.String sRoot
          The string that is the root object in the context tree (PC_STRING) OR semantic action list if mode bit PC_TAG is used.
 
Constructor Summary
AppParms()
          Constructor with default values for parse parameters.
 
Method Summary
 boolean abort()
          Callback that permits application to abort processing.
 java.lang.String getAltTitle()
          Callback function that allows the user to set the altTile.
abstract  boolean getParms(java.lang.String filePath)
          Set the above parameters(mode, sParms, sRoot) based upon the passed in file name.
 java.lang.String getURL()
          Callback function that allows the user to set the URL field.
 void init(com.doclinx.ftxml.SRC2STF_PARMS sParms, com.doclinx.ftxml.CatalogManager cm)
          Callback function called at beginning of the catAddFile() processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PC_TAG

public static final int PC_TAG
mode: Complete XML-like specification: '<tag p1="word" p2="wrd wrd">')

See Also:
Constant Field Values

PC_STRING

public static final int PC_STRING
mode: String parameters (use sRoot for tag): 'p1="word" p2="wrd wrd"')

See Also:
Constant Field Values

PC_SARRAY

public static final int PC_SARRAY
mode: C++ ONLY

See Also:
Constant Field Values

PC_PARRAY

public static final int PC_PARRAY
mode: C++ ONLY

See Also:
Constant Field Values

PC_ADDCAT

public static final int PC_ADDCAT
mode: Put parameters into catalog (6th auxInfo item)

See Also:
Constant Field Values

PC_INDEX

public static final int PC_INDEX
mode: Index parameters. (if set, then parms are searchable)

See Also:
Constant Field Values

sParms

public java.lang.String sParms
The parameter string passed back based on current file path


sRoot

public java.lang.String sRoot
The string that is the root object in the context tree (PC_STRING) OR semantic action list if mode bit PC_TAG is used.


mode

public int mode
Mode of operation control bit settings.
        PARAMETER CALLBACK Mode Settings

        PC_TAG      - sParms: <TAG "p1='w w w' p2='w w w' ... pn='last'>

                      sRoot:  Has semantic action info when using PC_TAG
                              Format: "tag,action;tag,action;....."
                              Allows semantic actions to be set on a document
                              basis (usually for the local user parameter data).

        PC_STRING   - sParms format: "p1='w w w' p2='w w w' ... pn='last'"
                      Note that the value parts can be quoted with (') or (")
                      The sRoot value contains the tag (path) name    

        PC_SARRAY   - C++ version ONLY!

        PC_PARRAY   - C++ version ONLY!

        PC_ADDCAT   - If set, then information is saved in catalog

        PC_INDEX    - If set, then information is indexed as part of document
    

Constructor Detail

AppParms

public AppParms()
Constructor with default values for parse parameters.

Method Detail

getParms

public abstract boolean getParms(java.lang.String filePath)
Set the above parameters(mode, sParms, sRoot) based upon the passed in file name.

Parameters:
filePath - Full path name of file currently being processed.
Returns:
true if the file is to be processed, false to skip the file.
 Sample implementation:

  public boolean getParms(String filePath)
  {
      if (filePath == "some name")
      {
          sParms = "p1='word word word' p2='x y z' p3...... pn='last'";
          sPath  = "lroot";    // query example: word in tag "lroot/@p1"
          mode   = PC_STRING | PC_ADDCAT | PC_INDEX;
   
          return true;
      }    

      // process any accepted file names here ...

      return false; // skip all "unknown files"
  }
     
Throws:
**none

abort

public boolean abort()
Callback that permits application to abort processing. This function is called after parameters passed by getParms have been processed and are no longer needed.

Returns:
true to terminate processing, else false to continue
Throws:
**none

getAltTitle

public java.lang.String getAltTitle()
Callback function that allows the user to set the altTile. This function is called after parameters passed by getParms have been processed. Override this method to return the AltTitle.

Returns:
boolean If not null or empty, set the alt title.
Throws:
**none

getURL

public java.lang.String getURL()
Callback function that allows the user to set the URL field. This function is called after parameters passed by getParms have been processed. Override this method to return the the URL.

Returns:
boolean If not null or empty, set the alt title.
Throws:
**none

init

public void init(com.doclinx.ftxml.SRC2STF_PARMS sParms,
                 com.doclinx.ftxml.CatalogManager cm)
Callback function called at beginning of the catAddFile() processing. Allows application to do initialization ops.

Throws:
**none